<!DOCTYPE html>
<html lang="en" dir="ltr">

<head>
  <meta charset="utf-8">
  <title>JavaScript</title>
</head>

<body>

<p id="p_name">用js替换元素内容</p>
<a href="JavaScript:void(0)", onclick="alert('Hello')">js点击事件,调用函数</a><br>

<a href="JavaScript:void(0)",onmouseover="this.style.color='red'",
onmouseleave="this.style.color='blue'",
onmouseup="this.text='Not clicked'",
onmousedown="this.text='You clicked me'">
一些常用鼠标事件
</a><br>

  <script type="text/javascript">
    document.write("JavaScript直接写内容的文档! <br>")
  </script>

<br>
<h2>加入文件js脚本</h2>
  <script type="text/javascript" src="./script.js"></script>
</body>

<br>


</html>
